<template>
  <base-echart ref="baseEchart" v-bind="$attrs" :options="mergeOptions"/>
</template>

<script>
import BaseEchart from "./base.vue";
import { deepMerge } from '@/util'


export default {
  components: {
    BaseEchart,
  },
  props: {
    options: {
      type: Object,
      default: () => {},
    }
  },
  computed: {
    mergeOptions () {
      // let merge = Object.assign({}, this.defaultOptions, this.options)
      // console.log('merge', merge);
      // return Object.assign({}, this.defaultOptions, this.options)
      // let merge = deepMerge(this.defaultOptions, this.options)
      // console.log('merge', merge);
      // return deepMerge(this.defaultOptions, this.options)
      return this.options
    }
  },
  data() {
    return {
      defaultOptions: {
        xAxis: {
          type: "category",
          data: [0],
        },
        yAxis: {
          type: "value",
        },
        series: [
          {
            data: [0],
            type: "line",
          },
        ],
      },
    };
  },
  mounted() {

  },
};
</script>

<style scoped></style>
